package studay.everyday.day1;

import java.util.Arrays;

public class 有序数组的平方 {

    public int[] sortedSquares(int[] A) {
        int len = A.length;
        int[] B = new int[len];

        for (int i = 0; i < len; i++) {
            B[i] = A[i]*A[i];
        }
        Arrays.sort(B);
        return B;

    }
}
